<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01_弹性布局入门</title>
    <style>
        .item{
            background-color: lightgreen;
            border: 3px solid green;
            width: 100px;
            height: 100px;
        }
        .container2{
            /*给父容器使用弹性布局，所有子元素横置 且父元素 会根据 子元素的实际高度 自动填充高度*/
            background-color: yellow;
            display: flex;
            /*01 flex的主轴方向*/
            flex-direction: row-reverse;/*行模式 反向排序*/
            flex-direction: column;/*列模式 正向排序*/
            flex-direction: column-reverse;/*列模式 反向排序*/
            flex-direction: row;/*行模式 正向排序 默认模式*/

            /* 02 flex的换行:*/
            flex-wrap: nowrap;
            flex-wrap: wrap;
        }

    </style>
</head>
<body>
<div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
</div>
<hr>
<div class="container2">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
    <div class="item">7</div>
</div>
</body>
</html>